import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import electron  from 'vite-plugin-electron'
import renderer from 'vite-plugin-electron-renderer'
import { resolve } from 'path'

export default defineConfig({
    base:'./',
    plugins:[
       vue(),
       electron({
         entry:'./electron/index.js',
         vite:{
             build:{
               outDir:'dist'
             }
          }
       }),
       renderer({
         entry:'./src/main.js',
         nodeIntegration: true,
       })
    ],
    server:{
      cors:true
    },
    resolve:{
      "alias":{
         "@":resolve(__dirname,'./src')
      }
    }
})